/*
 * Project: push-center-service-impl
 * 
 * File Created at 2014-10-9
 * 
 * Copyright 2012 Greenline.com Corporation Limited.
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * Greenline Company. ("Confidential Information").  You shall not
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with Greenline.com.
 */
package com.greenline.push.service.core.item;

import java.io.Serializable;
import java.util.Map;

import com.alibaba.fastjson.JSONObject;

/**
 * 推送的消息
 * 
 * @author weirui.shenwr
 * @date 2014-10-9
 * @version V1.0
 */
public class Packet implements Serializable {

    /**
     * 
     */
    private static final long serialVersionUID = 1L;
    // 数据的
    private Long dbMsgId;
    /**
     * 接受者ID
     */
    private Long recvUserId;

    // 业务模板id
    private Long templateId;

    // 数据参数
    private Map<String, String> param;

    // 定时发送时间
    private Long sendingTime;

    // 优先级
    private int priority;

    // 推送类型
    private int type;

    // 发送状态，默认是未发送，0；如果发送失败，改成1.
    private int status;
    // domain
    private Long domainId;
    // appchannel
    private Long appChannelId;
    // msgId
    private Long messageId;
    private transient Long classId;// 组id

    public Long getClassId() {
        return classId;
    }

    public void setClassId(Long classId) {
        this.classId = classId;
    }

    public Long getMessageId() {
        return messageId;
    }

    public void setMessageId(Long messageId) {
        this.messageId = messageId;
    }

    public Long getAppChannelId() {
        return appChannelId;
    }

    public void setAppChannelId(Long appChannelId) {
        this.appChannelId = appChannelId;
    }

    public Long getDbMsgId() {
        return dbMsgId;
    }

    public void setDbMsgId(Long dbMsgId) {
        this.dbMsgId = dbMsgId;
    }

    public Long getRecvUserId() {
        return recvUserId;
    }

    public void setRecvUserId(Long recvUserId) {
        this.recvUserId = recvUserId;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public Long getTemplateId() {
        return templateId;
    }

    public void setTemplateId(Long templateId) {
        this.templateId = templateId;
    }

    public Map<String, String> getParam() {
        return param;
    }

    public void setParam(Map<String, String> param) {
        this.param = param;
    }

    public Long getSendingTime() {
        return sendingTime;
    }

    public void setSendingTime(Long sendingTime) {
        this.sendingTime = sendingTime;
    }

    public int getPriority() {
        return priority;
    }

    public void setPriority(int priority) {
        this.priority = priority;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public Long getDomainId() {
        return domainId;
    }

    public void setDomainId(Long domainId) {
        this.domainId = domainId;
    }

    @Override
    public String toString() {
        return JSONObject.toJSONString(this);
    }
}
